﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Trains.DTO;

namespace Trains.Models
{
    public class TrainViewModel
    {
        [RegularExpression(@"([A-Za-z]-){1,}[A-Za-z]", ErrorMessage = "The format of route is not correctly.")]
        public string Route { get; set; }

        [RegularExpression(@"[A-Za-z]{1}", ErrorMessage = "Only one letter can be entered.")]
        
        public string FromStationName { get; set; }
        [RegularExpression(@"[A-Za-z]{1}", ErrorMessage = "Only one letter can be entered.")]
        public string ToStationName { get; set; }
        public OperationType OperationType { get; set; }

        public FliterType FilterType { get; set; }

        [Range(1, 100)]
        public int? FilterValue { get; set; }

        public string Result { get; set; }
    }
}
